<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="string" uri="http://jakarta.apache.org/taglibs/string-1.1" %>
<%@ taglib uri="/WEB-INF/tlds/pagination.tld" prefix="pagination" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <title>Dayve web</title>
    <link href="/common/css/style.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="/common/js/common.js"></script>
    <script type='text/javascript' src="/common/dwr/engine.js"></script>
    <script type='text/javascript' src="/common/dwr/util.js"></script>
    <script type="text/javascript">
        // 페이지 이동을 처리한다.
        function goListPage(page) {
            var TheForm = document.frm;
            TheForm.currentPage.value = page;
            TheForm.nextTarget.value = 'adminMemberList';
            TheForm.action = './adminMemberList.do';
            TheForm.submit();
        }

        // 검색어로 리스트를 출력한다.
        function jsSearchList() {
            var TheForm = document.frm;
            TheForm.id.value = TheForm.search_id.value;
            TheForm.nick_name.value = TheForm.search_nick_name.value;
            TheForm.email.value = TheForm.search_email.value;
            TheForm.nextTarget.value = 'adminMemberList';
            TheForm.action = './adminMemberList.do';
            TheForm.submit();
        }

        // 글쓰기 페이지로 이동 : 세션이 존재할 때만 가능
        function jsWriteBoard() {
            var TheForm = document.frm;
            TheForm.nextTarget.value = 'communityBoardWrite';
            TheForm.action = './communityBoardWrite.do';
            TheForm.submit();
        }

        // 게시물 보기 페이지로 이동
        function jsContentView() {
            var TheForm = document.frm;
            TheForm.nextTarget.value = 'communityBoardContent';
            TheForm.action = './communityBoardContent.do';
            TheForm.submit();
        }

        // Community Board List 페이지로 이동한다.
        function jsCommunityBoardList() {
            var TheForm = document.menuFrm;
            TheForm.nextTarget.value = "communityBoardList";	// page name
            TheForm.action = "./communityBoardList.do";
            TheForm.submit();
        }

        // Photo Board List 페이지로 이동한다.
        function jsPhotoBoardList() {
            var TheForm = document.menuFrm;
            TheForm.nextTarget.value = "photoBoardList";	// page name
            TheForm.action = "./photoBoardList.do";
            TheForm.submit();
        }

        // Notice Board List 페이지로 이동한다.
        function jsNoticeBoardList() {
            var TheForm = document.menuFrm;
            TheForm.nextTarget.value = "noticeBoardList";	// page name
            TheForm.action = "./noticeBoardList.do";
            TheForm.submit();
        }

        // Contact Us 페이지로 이동한다.
        function jsContactUs() {
            var TheForm = document.menuFrm;
            TheForm.nextTarget.value = "contactus";	// page name
            TheForm.action = "./contactus.do";
            TheForm.submit();
        }

        // FAQ 페이지로 이동한다.
        function jsFAQ() {
            var TheForm = document.menuFrm;
            TheForm.nextTarget.value = "faq";	// page name
            TheForm.action = "./faq.do";
            TheForm.submit();
        }

        // 회원정보 수정 액션
        function jsUpdateAction() {
            var TheForm = document.frm;

            if(trim(TheForm.country.value) == ""){
                alert("국가를 선택하세요.");
                TheForm.country.focus();
            }else{
                if(confirm('수정하시겠습니까?')){
                    TheForm.nextTarget.value = "adminMemberList";	// page name
                    TheForm.action = "./adminMemberUpdateAction.do";
                    TheForm.submit();
                }
            }
        }


    </script>
</head>

<body>
<div id="wrapper">
    <!------------------------------ top 시작-------------------------------------->
    <%@include file="header.jsp" %>
    <!------------------------------ top 끝-------------------------------------->
    <div class="mypage_content">
        <img src="/images/intro/sub_title08.gif"  />
        <a href="admin.do"><input name="Input" class="admin_button_off" value="<spring:message code="adminCategoryMemberList.topButton1" />" /></a>
        <a href="adminMemberList.do?id&nick_name&email"><input name="Input" class="admin_button_off" value="<spring:message code="adminCategoryMemberList.topButton2" />" /></a>
        <a href="adminStatistic.do"><input name="Input" class="admin_button_on" value="<spring:message code="adminCategoryMemberList.topButton3" />" /></a>
        <p class="admin_subtitle"><spring:message code="adminCategoryMemberList.subtitle" /></p>
        <p class="contactus">
            <spring:message code="adminCategoryMemberList.category" /> > ${name}
        </p>
        <table class="mypage_tb">
            <tr>
                <td class="admin_no">ID</td>
                <td class="admin_label">NICK_NAME</td>
                <td class="admin_label">EMAIL</td>
                <td class="admin_label">MOBILE_PHONE_NO</td>
                <td class="admin_label">COUNTRY</td>
                <td class="admin_label">HOME_PAGE</td>
                <td class="admin_label">BIRTHDAY</td>
                <td class="admin_label">SEX</td>
                <td class="admin_label">MILEAGE</td>
                <td class="admin_label">MODIFY_DATE</td>
                <td class="admin_lastlabel">REGISTER_DATE</td>
            </tr>

            <c:forEach items="${memberList}" var="memberList" varStatus="serviceStatus" begin="0" end="${totalMember}"
                       step="1">
                <tr>
                    <td class="admin_data"><a href="adminMemberUpdate.do?id=${memberList.id}">${memberList.id}</a></td>
                    <td class="admin_data"><a href="adminMemberUpdate.do?id=${memberList.id}">${memberList.nick_name}</a></td>
                    <td class="admin_dataleft"><a href="adminMemberUpdate.do?id=${memberList.id}">${memberList.email}</a></td>
                    <td class="admin_data"><a href="adminMemberUpdate.do?id=${memberList.id}">${memberList.mobile_phone_number}</a></td>
                    <td class="admin_data"><a href="adminMemberUpdate.do?id=${memberList.id}">${memberList.country}</a></td>
                    <td class="admin_dataleft"><a href="adminMemberUpdate.do?id=${memberList.id}">${memberList.home_page}</a></td>
                    <td class="admin_data"><a href="adminMemberUpdate.do?id=${memberList.id}">${memberList.birthday}</a></td>
                    <td class="admin_data"><a href="adminMemberUpdate.do?id=${memberList.id}">${memberList.sex}</a></td>
                    <td class="admin_data"><a href="adminMemberUpdate.do?id=${memberList.id}">${memberList.mileage}</a></td>
                    <td class="admin_data"><a href="adminMemberUpdate.do?id=${memberList.id}">${memberList.modify_date}</a></td>
                    <td class="admin_data"><a href="adminMemberUpdate.do?id=${memberList.id}">${memberList.register_date}</a></td>
                </tr>
            </c:forEach>
        </table>
    </div>
    <!------------------------------ 하위메뉴 시작-------------------------------------->
    <%@include file="footer.jsp" %>
    <!------------------------------ 하위메뉴 끝-------------------------------------->
</div>
</body>
</html>
